﻿using NUnit.Framework;
using System.Collections.Generic;
namespace ThunkC_.Collections_
{
    /// <summary>
    /// KeyValuePairFixture
    /// </summary>
    [TestFixture]
    public class KeyValuePairFixture
    {
        [Test]
        public void Constructor_Valid_NotNull()
        {
            var keyValuePair = new KeyValuePair<string, object>("test", 1);
            Assert.IsNotNull(keyValuePair);
        }

        [Test]
        public void Key_Valid_EqualsTest()
        {
            var keyValuePair = new KeyValuePair<string, object>("test", 1);
            Assert.AreEqual("test", keyValuePair.Key);
        }

        [Test]
        public void Value_Valid_EqualsOne()
        {
            var keyValuePair = new KeyValuePair<string, object>("test", 1);
            Assert.AreEqual(1, keyValuePair.Value);
        }

        [Test]
        public void ToString_Valid_EqualsTestAndOne()
        {
            var keyValuePair = new KeyValuePair<string, object>("test", 1);
            Assert.AreEqual("[test, 1]", keyValuePair.ToString());
        }
    }
}
